package com.tecnalia.authz.common.comm;

import org.jboss.security.xacml.interfaces.RequestContext;
import org.jboss.security.xacml.interfaces.ResponseContext;

import com.tecnalia.authz.common.comm.error.IProtocolError;
import com.tecnalia.authz.common.comm.request.IRequestSerialized;
import com.tecnalia.authz.common.comm.response.IResponseSerialized;

public interface IProtocol {

	/**
	 * Sets the request serialized impl.
	 *
	 * @param requestSerialized the new request serialized impl
	 */
	public abstract void setObjectInSerializedImpl(
			IRequestSerialized requestSerialized);

	/**
	 * Sets the protocol error impl.
	 *
	 * @param protocolError the new protocol error impl
	 */
	public abstract void setProtocolErrorImpl(IProtocolError protocolError);

	/**
	 * Sets the response serialized impl.
	 *
	 * @param responseSerialized the new response serialized impl
	 */
	public abstract void setObjectOutSerializedImpl(
			IResponseSerialized responseSerialized);

	/* (non-Javadoc)
	 * @see org.esi.authz.common.comm.IProtocolData#setName()
	 */
	public abstract int getID();

	/* (non-Javadoc)
	 * @see org.esi.authz.common.comm.IProtocolData#setName()
	 */
	public abstract void setID(int ID);

	/* (non-Javadoc)
	 * @see org.esi.authz.common.comm.IProtocolData#setName()
	 */
	public abstract String getName();

	/* (non-Javadoc)
	 * @see org.esi.authz.common.comm.IProtocolData#setName()
	 */
	public abstract void setName(String name);

	/* (non-Javadoc)
	 * @see org.esi.authz.common.comm.request.IRequestSerialized#getQueryMode()
	 */
	public abstract int getQueryMode();

	/* (non-Javadoc)
	 * @see org.esi.authz.common.comm.request.IRequestSerialized#setQueryMode(int)
	 */
	public abstract void setQueryMode(int queryMode);

	/* (non-Javadoc)
	 * @see org.esi.authz.common.comm.request.IRequestSerialized#serializeRequest(org.jboss.security.xacml.interfaces.RequestContext[])
	 */
	public abstract void serializeRequest(RequestContext[] request);

	/* (non-Javadoc)
	 * @see org.esi.authz.common.comm.request.IRequestSerialized#deserializeRequest()
	 */
	public abstract RequestContext[] deserializeRequest();

	/* (non-Javadoc)
	 * @see org.esi.authz.common.comm.request.IRequestSerialized#LogRequest()
	 */
	public abstract void LogRequest();

	/* (non-Javadoc)
	 * @see org.esi.authz.common.comm.response.IResponseSerialized#serializeResponse(org.jboss.security.xacml.interfaces.ResponseContext[])
	 */
	public abstract void serializeResponse(ResponseContext[] responseAuthz);

	/* (non-Javadoc)
	 * @see org.esi.authz.common.comm.response.IResponseSerialized#deserializeResponse()
	 */
	public abstract ResponseContext[] deserializeResponse();

	/* (non-Javadoc)
	 * @see org.esi.authz.common.comm.error.IProtocolError#getError()
	 */
	public abstract int getError();

	/* (non-Javadoc)
	 * @see org.esi.authz.common.comm.error.IProtocolError#setError(int)
	 */
	public abstract void setError(int error);

	/* (non-Javadoc)
	 * @see org.esi.authz.common.comm.error.IProtocolError#getErrorString()
	 */
	public abstract String getErrorString();

	/* (non-Javadoc)
	 * @see org.esi.authz.common.comm.error.IProtocolError#setErrorString(java.lang.String)
	 */
	public abstract void setErrorString(String errorString);

	/* (non-Javadoc)
	 * @see org.esi.authz.common.comm.error.IProtocolError#setInvalidIdName(int, java.lang.String)
	 */
	public abstract void setInvalidIdName(int ID, String name);

}